package cn.lzh.mapper;


import cn.lzh.entity.Order;
import cn.lzh.entity.Orditem;
import cn.lzh.entity2.ItemBook;
import cn.lzh.entity2.OrdInfo;
import cn.lzh.entity2.OrderLine;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderMapper {
    //添加订单
    public void addOrd(Order order);
    //添加订单明细
    public void addItm(Orditem orditm);

    List<OrdInfo> findOrdItemsByUid(@Param("uid") int uid, @Param("ispay") int ispay, @Param("tstart") Date tstart, @Param("tend") Date tend);

    void updateOrdAddr(Order ord);

    void updateOrdPay(Order ord);

    void updateOrdShip(Order ord);

    Order findOrderById(int ordid);

    List<ItemBook> findItemBookByOrdid(int ordid);

    List<OrderLine> findOrdLines(Map<String, Object> map);

    List<Map<String, Object>> findItemInfoByOrdid(int ordid);

    int getCount(Map<String, Object> map);

    OrdInfo findOrdItemsByOrdid(Map<String, Object> map);


}
